<%@page language="java" contentType="text/html; charset=UTF-8" isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="html" tagdir="/WEB-INF/tags" %>
<!DOCTYPE html>
<html>
<html:header title="零售收银-取单">
    <link rel="stylesheet" href="${baseUrl}css/public.css" media="all">

    <style>

    </style>

    <script>
        jQuery(function () {
            $(window).focus();
            window.addEventListener("keydown", function(e) {
                if (e.keyCode == 0x1B){
                    closeAllDialog();
                } else if (e.keyCode == 0x0D && (navigator.platform.match("Mac") ? e.metaKey : e.ctrlKey)) {//ctrl+enter
                    CtrlEnter();
                }  else if (e.keyCode == 0x0D ) {//enter
                    enter();
                }
            }, false);

            $(".esc").click(function () {
                closeAllDialog();
            });

            function CtrlEnter(){
                console.log("直接取单");
                window.parent.takeCallBack(2);
                closeAllDialog();
            }

            function enter() {
                console.log("调取换单");
                window.parent.takeCallBack(1);
                closeAllDialog();
            }


            $(".change").click(function () {
                enter();
            });

            $(".take").click(function () {
                CtrlEnter();
            });
        });



        function closeAllDialog() {
            window.parent.closeAllDialog();
        }
    </script>
</html:header>
<body style="margin:0;background-color: #FFFFFF;height: 270px;width: 500px;padding-top: 30px;">
    <div style="margin: 0 auto;border-radius: 50%; width: 80px;height: 80px;line-height: 80px; background-color: #dddddd;text-align: center;">
        <i class="layui-icon layui-icon-help" style="color: #ffffff;font-size: 40px;"></i>
    </div>

    <div style="font-size: 24px;width: 100%; text-align: center;padding-top: 20px;">
        前单据还未结算，确定取单吗？
    </div>

    <div style="margin: 0 auto; width: 325px;margin-top: 40px;">
        <button class="layui-btn layui-btn-normal change">调取换单(Enter)</button>
        <button class="layui-btn layui-btn-primary take">直接取单(Ctrl+Enter)</button>
    </div>
</body>

</html>